﻿using AntdUI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PosClient.Controls
{
    public partial class TSwitch : Control
    {
        public TSwitch()
        {
            InitializeComponent();
        }


        private string _TextInput;
        private bool _Check;


        [Description("标题"), Category("外观"), DefaultValue(null)]
        public string TextInput
        {
            get => _TextInput;
            set 
            {
                if (_TextInput == value) return;
                _TextInput = value;
                label_title.Text = _TextInput;
                Invalidate();
            }
        }

        [Description("状态"), Category("外观"), DefaultValue(null)]
        public bool Check
        {
            get => _Check;
            set
            {
                if (_Check == value) return;
                _Check = value;
                switch_check.Checked = _Check;
                Invalidate();
            }
        }

    }
}
